import request from '@/router/axios'
import {
  approveStatus, fenExYuangettoFixed,
  getApproveStatus,
  getLineName,
  getreplayStatusFormat,
  getStationName,
  qianxiangType
} from "../../commonCheck";

import store from '@/store';

export const tableOption = {
  emptyBtn:false,
  border: true,
  index: true,
  indexLabel: '序号',
  selection: true,
  reserveSelection:true,
  stripe: true,
  menuWidth:150,
  menuAlign: 'center',
  editBtn: false,
  delBtn: false,
  align: 'center',
  addBtn: false,
  height: 500,
  column: [{label:"线路",
    prop:"lineCode",type:'select',search:true,searchslot:true,formatter: function(row, value , label, column){
      return getLineName(value);
    }},
    {label:"站点",
      prop:"stationCode",type:'select',search:true,searchslot:true,formatter: function(row, value , label, column){
        return getStationName(row.lineCode,value);
      }},
    {label:"设备编号",type:'select',search:true,searchslot:true,
      prop:"equipmentCode"},
    {label:"日期",search:true,type:'date',valueFormat: 'yyyy-MM-dd',
    prop:"revenueDate"},
    // {label:"票价",
    //   prop:"unitPrice",type:'number',labelWidth:127,formatter:function (row,value) {
    //     return fenExYuangettoFixed(row,'unitPrice');
    //   }},
    {label:"对比发售数量",width: 120,
      prop:"compareTotalNumberSales"},
    {label:"对比小计金额",width: 120,
      prop:"compareSubtotalTotal",formatter:function (row,value) {
        return fenExYuangettoFixed(row,'compareSubtotalTotal');
      }},
      ]
}

export function getSwAuInputInternetTicketEquipmentDetails(query) {
  return request({
    url: '/check/check/getSwAuInputInternetTicketEquipmentDetails',
    method: 'post',
    params: query
  })
}

export function mondifySwAuInputInternetTicketEquipmentDetail(param){
  return request({
    url: '/check/check/mondifySwAuInputInternetTicketEquipmentDetail',
    method: 'post',
    params: param
  })
}

export function updateSwAuInputInternetTicketEquipmentDetails(param){
  return request({
    url: '/check/check/updateSwAuInputInternetTicketEquipmentDetails',
    method: 'post',
    params: param
  })
}

export function submitSwAuInputInternetTicketEquipmentDetails(param){
  return request({
    url: '/check/check/submitSwAuInputInternetTicketEquipmentDetails',
    method: 'post',
    params: param
  })
}


export function importDataSwAuInputInternetTicketEquipmentDetails(param){
  return request({
    url: '/check/check/importDataSwAuInputInternetTicketEquipmentDetails',
    method: 'post',
    params: param,
    timeout: 60000,
  })
}

export function import_xc_result(param){
  return request({
    url: '/check/check/import_xc_result',
    method: 'post',
    params: param,
    timeout: 60000,
  })
}

export function down_hlw_upload_Templete(param){
  return request({
    url: '/check/check/down_hlw_upload_Templete',
    method: 'post',
    params: param,
    timeout: 60000,
    responseType: 'arraybuffer'
  })
}
